package com.jiyun.controller;

import com.jiyun.pojo.AddManage;
import com.jiyun.service.AddManageService;
import com.jiyun.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/addmanage")
public class AddManageController {

    @Autowired
    AddManageService addManageService;

    @RequestMapping("/findAddManage")
    public R findAddManage(@RequestBody AddManage addManage){
        return addManageService.findAddManage(addManage);
    }

    @RequestMapping("/add")
    public R add(@RequestBody AddManage addManage){
        return addManageService.add(addManage);
    }

    @RequestMapping("/findAddManageById")
    public R findAddManageById(Integer id){
        return addManageService.findAddManageById(id);
    }

    @RequestMapping("/deletemanage")
    public R deletemanage(Integer id){
        return addManageService.deletemanage(id);
    }

    @RequestMapping("/updatestatus")
    public R updatestatus(Integer id){
        return addManageService.updatestatus(id);
    }

    @RequestMapping("/updatezt")
    public R updatezt(Integer id){
        return addManageService.updatezt(id);
    }

    @PostMapping("/selectstatus")
    public R selectstatus(){
        return addManageService.selectstatus();
    }

}
